package com.venusj.ipersistence.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhangjh
 * @date 2020/10/15
 * @desc
 */
public class ParamterMappingTokenHandler implements TokenHandler{

    private List<ParamterMapping> paramterMappingList = new ArrayList<>();


    public List<ParamterMapping> getParamterMappingList() {
        return paramterMappingList;
    }

    public void setParamterMappingList(List<ParamterMapping> paramterMappingList) {
        this.paramterMappingList = paramterMappingList;
    }

    @Override
    public String handlerToken(String content) {
        paramterMappingList.add(buildParamMapping(content));
        return "?";
    }

    private ParamterMapping buildParamMapping(String content) {
        return new ParamterMapping(content);
    }
}
